package org.exam.blog.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;

import java.util.Date;

@Data
@AllArgsConstructor
@NoArgsConstructor
@Document("article")
public class Article {
    @Id
    private String _id;
    private Long id;
    private String articlePic;
    private String articleName;
    private String articleTag = "IO流";
    private Long articleType;
    private Integer articleState;
    private Integer topState;
    private Long publishId;
    @JsonFormat(pattern = "yyyy-MM - dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime = new Date();
    @JsonFormat(pattern = "yyyy-MM - dd HH:mm:ss", timezone = "GMT+8")
    private Date updateTime;
    private Integer articleReadCount;
    private Integer articleStarNum;
    private Integer articleCommentNum;
    private String articleRemark;
    private String articleContent;
    private String articleTypeName ;
    private String publishName = "东邪";
    private Integer num;


}
